﻿USE [DBProyectos]
GO
/****** Object:  Table [dbo].[Empresa]    Script Date: 05/20/2011 18:11:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Empresa](
	[empresaId] [int] IDENTITY(200,1) NOT NULL,
	[razonSocial] [varchar](200) NOT NULL,
	[ruc] [varchar](15) NOT NULL,
	[direccion] [varchar](150) NULL,
 CONSTRAINT [PK_Empresa] PRIMARY KEY CLUSTERED 
(
	[empresaId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Empresa] ON
INSERT [dbo].[Empresa] ([empresaId], [razonSocial], [ruc], [direccion]) VALUES (200, N'CONSTRUCTORES GENERALES SA', N'12345634670', NULL)
INSERT [dbo].[Empresa] ([empresaId], [razonSocial], [ruc], [direccion]) VALUES (201, N'EL CORRECAMINOS EIRL', N'13457802345', NULL)
SET IDENTITY_INSERT [dbo].[Empresa] OFF
/****** Object:  Table [dbo].[Proyecto]    Script Date: 05/20/2011 18:11:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Proyecto](
	[proyectoId] [int] IDENTITY(300,1) NOT NULL,
	[nomProyecto] [varchar](200) NOT NULL,
	[fini] [datetime] NOT NULL,
	[ffin] [datetime] NOT NULL,
	[presupuesto] [decimal](18, 2) NOT NULL,
	[empresaId] [int] NOT NULL,
 CONSTRAINT [PK_Proyecto] PRIMARY KEY CLUSTERED 
(
	[proyectoId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Proyecto] ON
INSERT [dbo].[Proyecto] ([proyectoId], [nomProyecto], [fini], [ffin], [presupuesto], [empresaId]) VALUES (300, N'MERACADO ZONAL CAJAMARCA', CAST(0x00009E5E00000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), CAST(50000.00 AS Decimal(18, 2)), 200)
INSERT [dbo].[Proyecto] ([proyectoId], [nomProyecto], [fini], [ffin], [presupuesto], [empresaId]) VALUES (302, N'AMPLICACION SKTE PARK', CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), CAST(12345.00 AS Decimal(18, 2)), 201)
SET IDENTITY_INSERT [dbo].[Proyecto] OFF
/****** Object:  StoredProcedure [dbo].[GetAllFromProyecto]    Script Date: 05/20/2011 18:11:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Script para el comando SelectTopNRows de SSMS  ******/
create procedure [dbo].[GetAllFromProyecto]
as
begin 
SELECT [proyectoId]
      ,[nomProyecto]
      ,[fini]
      ,[ffin]
      ,[presupuesto]
      ,[empresaId]
  FROM [Proyecto]
  end
GO
/****** Object:  Table [dbo].[Contrato]    Script Date: 05/20/2011 18:11:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Contrato](
	[contratoId] [int] IDENTITY(400,1) NOT NULL,
	[proyectoId] [int] NOT NULL,
	[remunerarcion] [decimal](18, 2) NOT NULL,
	[fini] [datetime] NOT NULL,
	[ffin] [datetime] NOT NULL,
	[activo] [bit] NOT NULL,
	[nombres] [varchar](80) NOT NULL,
	[apellidos] [varchar](255) NOT NULL,
	[dni] [varchar](12) NOT NULL,
 CONSTRAINT [PK_Contrato] PRIMARY KEY CLUSTERED 
(
	[contratoId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Contrato] ON
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (402, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' CLAUDIA PAMELA', N'ALBINES LA TORRE', N'43456786')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (403, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' FERNANDO GERALD', N'ALVA QUIROZ', N'43456787')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (404, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' CARMEN ELIZABETH', N'ASENCIO AMBROSIO', N'43456788')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (405, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' OLIVER', N'BECERRA BRIONES', N'43456789')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (406, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' EINER EDUARDO', N'CABRERA HUATAY', N'43456790')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (407, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' SILVIA JASMINNE', N'CARMONA CUSQUISIBAN', N'43456791')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (408, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' MARIA JOSE', N'CHAVEZ ESTRADA', N'43456792')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (409, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' HECTOR BRIAM', N'CHAVEZ VASQUEZ', N'43456793')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (410, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' VICKY', N'CHILON ABANTO', N'43456794')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (411, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' VERONICA CECILIA', N'HUAMAN TELLO', N'43456795')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (412, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' LUIS GUSTAVO', N'HUARIPATA SANCHEZ', N'43456796')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (413, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' WILLIAMS JIMMY', N'INFANTE PRADO', N'43456797')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (414, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' OSMAR MIGUEL', N'LLUEN FERNANDEZ', N'43456798')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (415, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' RONAL DANIEL', N'NUREÑA TRUJILLO', N'43456799')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (416, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' NANCY JULIA', N'RODRIGUEZ ALVAREZ', N'43456800')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (417, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' CARLOS ALBERTO', N'ROJAS RODRIGUEZ', N'43456801')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (418, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' JHIMY DANIEL', N'TAFUR CHAVEZ', N'43456802')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (419, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' EINSTEIN DELIS', N'TARRILLO DIAZ', N'43456803')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (420, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' EDGAR EDUARDO', N'TELLO CRUZADO', N'43456804')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (421, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' JOSE DANNY', N'VALDEZ HUAMAN', N'43456805')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (422, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' HERMAN', N'VASQUEZ SALAZAR', N'43456806')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (423, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' RAFAEL', N'VILLANUEVA CASTREJON', N'43456807')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (424, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' DARWIN ABEL', N'YABAR LICONA', N'43456808')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (425, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' ZARELA JHAZMIN', N'ARROYO RODRIGUEZ', N'43456809')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (426, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' JORGE LUIS', N'ARROYO ROJAS', N'43456810')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (427, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' IRBIN HUMBERTO', N'BIFFI SUROPACHIN', N'43456811')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (428, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' WILDER FERNANDO', N'BOZA SANCHEZ', N'43456812')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (429, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' LIZ KARINA', N'CARRANZA RIOS', N'43456813')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (430, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' EDWIN MARCIAL', N'CHAVEZ VILCHEZ', N'43456814')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (431, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' CORINA VITALIA', N'FERREYRA LEIVA', N'43456815')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (432, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' EDITH JULIANA', N'FUENTES TORRES', N'43456816')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (433, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' JACKSON', N'MARIÑAS JIMENEZ', N'43456817')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (434, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' FELIPE ALEJANDRO', N'MENDOZA AVALOS', N'43456818')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (435, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' CECILIO CESAR', N'NIÑO RETO', N'43456819')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (436, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' DEYSI AIDEE', N'NORIEGA ALFARO', N'43456820')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (437, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' SEGUNDO AGUSTIN', N'OCAS CERNA', N'43456821')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (438, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' EDUARD RICHARD', N'ORTIZ SANCHEZ', N'43456822')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (439, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' JOSE RAUL', N'PEREZ BECERRA', N'43456823')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (440, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' KELLY YULIANA', N'SANCHEZ ALFARO', N'43456824')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (441, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' JAIME RAUL', N'TERAN RAMIREZ', N'43456825')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (442, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' GILMER ROLANDO', N'TERRONES TERRONES', N'43456826')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (443, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' MISAEL ALBERTO', N'VERA SALDAÑA', N'43456827')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (444, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' SAMUEL JEHOSAFET', N'CALDERON HUACCHA', N'43456828')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (445, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' CARLOS DAVID', N'CORCUERA URQUIZA', N'43456829')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (446, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' GIANCARLO RAUL', N'INFANTE GIRON', N'43456830')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (447, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' HERNAN', N'JAMBO HUAYAC', N'43456831')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (448, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' ALEX JHOVANNY', N'JARA MUÑOZ', N'43456832')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (449, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' KOLLBER ALEJANDRO', N'JIMENEZ CHAVEZ', N'43456833')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (450, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' LIVIA FRANCESCA', N'LINARES CHAVEZ', N'43456834')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (451, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' JOSE MIGUEL', N'MANAY MENDOZA', N'43456835')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (452, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' JESUS', N'MOYA CERQUIN', N'43456836')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (453, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' LUIS ALFONSO', N'MUÑOZ MUJICA', N'43456837')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (454, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' DEBORA SOFIA', N'RIMAS GALLEGOS', N'43456838')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (455, 300, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009EB800000000 AS DateTime), CAST(0x00009EF400000000 AS DateTime), 1, N' ROGER', N'VENTURA VILLANUEVA', N'43456839')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (456, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' CLAUDIA PAMELA', N'ALBINES LA TORRE', N'43456786')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (457, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' FERNANDO GERALD', N'ALVA QUIROZ', N'43456787')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (458, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' CARMEN ELIZABETH', N'ASENCIO AMBROSIO', N'43456788')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (459, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' OLIVER', N'BECERRA BRIONES', N'43456789')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (460, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' EINER EDUARDO', N'CABRERA HUATAY', N'43456790')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (461, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' SILVIA JASMINNE', N'CARMONA CUSQUISIBAN', N'43456791')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (462, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' MARIA JOSE', N'CHAVEZ ESTRADA', N'43456792')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (463, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' HECTOR BRIAM', N'CHAVEZ VASQUEZ', N'43456793')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (464, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' VICKY', N'CHILON ABANTO', N'43456794')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (465, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' VERONICA CECILIA', N'HUAMAN TELLO', N'43456795')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (466, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' LUIS GUSTAVO', N'HUARIPATA SANCHEZ', N'43456796')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (467, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' WILLIAMS JIMMY', N'INFANTE PRADO', N'43456797')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (468, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' OSMAR MIGUEL', N'LLUEN FERNANDEZ', N'43456798')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (469, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' RONAL DANIEL', N'NUREÑA TRUJILLO', N'43456799')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (470, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' NANCY JULIA', N'RODRIGUEZ ALVAREZ', N'43456800')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (471, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' CARLOS ALBERTO', N'ROJAS RODRIGUEZ', N'43456801')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (472, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' JHIMY DANIEL', N'TAFUR CHAVEZ', N'43456802')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (473, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' EINSTEIN DELIS', N'TARRILLO DIAZ', N'43456803')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (474, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' EDGAR EDUARDO', N'TELLO CRUZADO', N'43456804')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (475, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' JOSE DANNY', N'VALDEZ HUAMAN', N'43456805')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (476, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' HERMAN', N'VASQUEZ SALAZAR', N'43456806')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (477, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' RAFAEL', N'VILLANUEVA CASTREJON', N'43456807')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (478, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' DARWIN ABEL', N'YABAR LICONA', N'43456808')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (479, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' ZARELA JHAZMIN', N'ARROYO RODRIGUEZ', N'43456809')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (480, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' JORGE LUIS', N'ARROYO ROJAS', N'43456810')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (481, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' IRBIN HUMBERTO', N'BIFFI SUROPACHIN', N'43456811')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (482, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' WILDER FERNANDO', N'BOZA SANCHEZ', N'43456812')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (483, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' LIZ KARINA', N'CARRANZA RIOS', N'43456813')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (484, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' EDWIN MARCIAL', N'CHAVEZ VILCHEZ', N'43456814')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (485, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' CORINA VITALIA', N'FERREYRA LEIVA', N'43456815')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (486, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' EDITH JULIANA', N'FUENTES TORRES', N'43456816')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (487, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' JACKSON', N'MARIÑAS JIMENEZ', N'43456817')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (488, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' FELIPE ALEJANDRO', N'MENDOZA AVALOS', N'43456818')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (489, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' CECILIO CESAR', N'NIÑO RETO', N'43456819')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (490, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' DEYSI AIDEE', N'NORIEGA ALFARO', N'43456820')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (491, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' SEGUNDO AGUSTIN', N'OCAS CERNA', N'43456821')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (492, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' EDUARD RICHARD', N'ORTIZ SANCHEZ', N'43456822')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (493, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' JOSE RAUL', N'PEREZ BECERRA', N'43456823')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (494, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' KELLY YULIANA', N'SANCHEZ ALFARO', N'43456824')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (495, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' JAIME RAUL', N'TERAN RAMIREZ', N'43456825')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (496, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' GILMER ROLANDO', N'TERRONES TERRONES', N'43456826')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (497, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' MISAEL ALBERTO', N'VERA SALDAÑA', N'43456827')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (498, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' SAMUEL JEHOSAFET', N'CALDERON HUACCHA', N'43456828')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (499, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' CARLOS DAVID', N'CORCUERA URQUIZA', N'43456829')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (500, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' GIANCARLO RAUL', N'INFANTE GIRON', N'43456830')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (501, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' HERNAN', N'JAMBO HUAYAC', N'43456831')
GO
print 'Processed 100 total records'
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (502, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' ALEX JHOVANNY', N'JARA MUÑOZ', N'43456832')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (503, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' KOLLBER ALEJANDRO', N'JIMENEZ CHAVEZ', N'43456833')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (504, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' LIVIA FRANCESCA', N'LINARES CHAVEZ', N'43456834')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (505, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' JOSE MIGUEL', N'MANAY MENDOZA', N'43456835')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (506, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' JESUS', N'MOYA CERQUIN', N'43456836')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (507, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' LUIS ALFONSO', N'MUÑOZ MUJICA', N'43456837')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (508, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' DEBORA SOFIA', N'RIMAS GALLEGOS', N'43456838')
INSERT [dbo].[Contrato] ([contratoId], [proyectoId], [remunerarcion], [fini], [ffin], [activo], [nombres], [apellidos], [dni]) VALUES (509, 302, CAST(1200.00 AS Decimal(18, 2)), CAST(0x00009E9900000000 AS DateTime), CAST(0x00009EE400000000 AS DateTime), 1, N' ROGER', N'VENTURA VILLANUEVA', N'43456839')
SET IDENTITY_INSERT [dbo].[Contrato] OFF
/****** Object:  StoredProcedure [dbo].[GetFromContratoProyEmpresa]    Script Date: 05/20/2011 18:11:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[GetFromContratoProyEmpresa]
as
begin
select (apellidos + ', ' +c.nombres) as personal,
c.remunerarcion,
p.nomProyecto,
e.razonSocial 
from Contrato c inner join Proyecto p on c.proyectoId = p.proyectoId
inner join Empresa e on e.empresaId = p.empresaId
end
GO
/****** Object:  StoredProcedure [dbo].[GetFromContratoByProyectoId]    Script Date: 05/20/2011 18:11:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Script para el comando SelectTopNRows de SSMS  ******/
create procedure [dbo].[GetFromContratoByProyectoId]
@proyectoId int
as
begin
SELECT [contratoId]
      ,[proyectoId]
      ,[remunerarcion]
      ,[fini]
      ,[ffin]
      ,[activo]
      ,[nombres]
      ,[apellidos]
      ,[dni]
  FROM [Contrato]
  where proyectoId = @proyectoId
  end
GO
/****** Object:  StoredProcedure [dbo].[GetFromContratoByFinContrato]    Script Date: 05/20/2011 18:11:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[GetFromContratoByFinContrato]
@fec1 datetime,
@fec2 datetime
as
begin
SELECT [contratoId]
      ,[proyectoId]
      ,[remunerarcion]
      ,[fini]
      ,[ffin]
      ,[activo]
      ,[nombres]
      ,[apellidos]
      ,[dni]
  FROM [Contrato]
  where @fec1 <= ffin and ffin <= @fec2
  end
GO
/****** Object:  Default [DF_Contrato_remunerarcion]    Script Date: 05/20/2011 18:11:52 ******/
ALTER TABLE [dbo].[Contrato] ADD  CONSTRAINT [DF_Contrato_remunerarcion]  DEFAULT ((0)) FOR [remunerarcion]
GO
/****** Object:  Default [DF_Contrato_activo]    Script Date: 05/20/2011 18:11:52 ******/
ALTER TABLE [dbo].[Contrato] ADD  CONSTRAINT [DF_Contrato_activo]  DEFAULT ((1)) FOR [activo]
GO
/****** Object:  Default [DF_Proyecto_presupuesto]    Script Date: 05/20/2011 18:11:52 ******/
ALTER TABLE [dbo].[Proyecto] ADD  CONSTRAINT [DF_Proyecto_presupuesto]  DEFAULT ((0)) FOR [presupuesto]
GO
/****** Object:  ForeignKey [FK_Contrato_Proyecto]    Script Date: 05/20/2011 18:11:52 ******/
ALTER TABLE [dbo].[Contrato]  WITH CHECK ADD  CONSTRAINT [FK_Contrato_Proyecto] FOREIGN KEY([proyectoId])
REFERENCES [dbo].[Proyecto] ([proyectoId])
GO
ALTER TABLE [dbo].[Contrato] CHECK CONSTRAINT [FK_Contrato_Proyecto]
GO
/****** Object:  ForeignKey [FK_Proyecto_Empresa]    Script Date: 05/20/2011 18:11:52 ******/
ALTER TABLE [dbo].[Proyecto]  WITH CHECK ADD  CONSTRAINT [FK_Proyecto_Empresa] FOREIGN KEY([empresaId])
REFERENCES [dbo].[Empresa] ([empresaId])
GO
ALTER TABLE [dbo].[Proyecto] CHECK CONSTRAINT [FK_Proyecto_Empresa]
GO
